import React from 'react'
import './index.scss'
export default function GoodsItem({
  id,
  goods_name,
  goods_img,
  goods_price,
  goods_count,
  goods_state,
}) {
  return (
    <div className='my-goods-item'>
      <div className='left'>
        <div className='custom-control custom-checkbox'>
          {/* //!不要忘记处理 id */}
          <input
            type='checkbox'
            className='custom-control-input'
            id={`input${id}`}
            checked={goods_state}
            onChange={() => {}}
          />
          <label className='custom-control-label' htmlFor={`input${id}`}>
            <img src={goods_img} alt='' />
          </label>
        </div>
      </div>
      <div className='right'>
        <div className='top'>{goods_name}</div>
        <div className='bottom'>
          <span className='price'>¥ {goods_price}</span>
          <span>{goods_count}</span>
        </div>
      </div>
    </div>
  )
}
